import 'package:flutter/material.dart';

class FYHomeAppBar  extends AppBar {
  //重写父类构造方法
  FYHomeAppBar(BuildContext context):super(
    leading: Builder(
      builder: (ctx){
        return IconButton(
          icon: Icon(Icons.build),
          onPressed: (){
            //context 为 main中的context ,ctx为homepage中context
            Scaffold.of(context).openDrawer();
          },
        );
      },
    ),
    title: Text('美食广场' ),
  );
}
